﻿using System.Web.Mvc;
using Omu.Awesome.Mvc.Helpers;

namespace Omu.Awesome.Mvc
{
    public class AjaxDropdownAttribute : MetadataAttribute
    {
        public string Controller { get; set; }
        public string ParentId { get; set; }

        public override void Process(ModelMetadata m)
        {
            m.Add(Controller != null, "controller", Controller);
            m.Add(ParentId != null, "parentId", ParentId);
        }
    }
}